// [技术]操作日志记录
import { axios } from '@/utils/request';

/**
 * 获取SysOperLog
 * @params params
 * {
    {"id":{"required":true,"type":"integer"}}
   }
 */
export function getSysOperLog(params) {
  return axios({
    method: 'get',
    url: '/api/sys-oper-log',
    params
  })
}

/**
 * 创建SysOperLog
 * @params data
 * {
    {"appId":{"type":"integer"}},
    {"businessType":{"type":"integer"}},
    {"createBy":{"type":"string"}},
    {"createDate":{"type":"string"}},
    {"errorMsg":{"type":"string"}},
    {"id":{"type":"integer"}},
    {"jsonResult":{"type":"string"}},
    {"method":{"type":"string"}},
    {"modifyBy":{"type":"string"}},
    {"modifyDate":{"type":"string"}},
    {"operIp":{"type":"string"}},
    {"operLocation":{"type":"string"}},
    {"operName":{"type":"string"}},
    {"operParam":{"type":"string"}},
    {"operTime":{"type":"string"}},
    {"operUrl":{"type":"string"}},
    {"operatorType":{"type":"integer"}},
    {"requestMethod":{"type":"string"}},
    {"status":{"type":"integer"}},
    {"title":{"type":"string"}}
   }
 */
export function postSysOperLog(data) {
  return axios({
    method: 'post',
    url: '/api/sys-oper-log',
    data
  })
}

/**
 * 修改SysOperLog
 * @params data
 * {
    {"appId":{"type":"integer"}},
    {"businessType":{"type":"integer"}},
    {"createBy":{"type":"string"}},
    {"createDate":{"type":"string"}},
    {"errorMsg":{"type":"string"}},
    {"id":{"type":"integer"}},
    {"jsonResult":{"type":"string"}},
    {"method":{"type":"string"}},
    {"modifyBy":{"type":"string"}},
    {"modifyDate":{"type":"string"}},
    {"operIp":{"type":"string"}},
    {"operLocation":{"type":"string"}},
    {"operName":{"type":"string"}},
    {"operParam":{"type":"string"}},
    {"operTime":{"type":"string"}},
    {"operUrl":{"type":"string"}},
    {"operatorType":{"type":"integer"}},
    {"requestMethod":{"type":"string"}},
    {"status":{"type":"integer"}},
    {"title":{"type":"string"}}
   }
 */
export function putSysOperLog(data) {
  return axios({
    method: 'put',
    url: '/api/sys-oper-log',
    data
  })
}

/**
 * 删除SysOperLog
 * @params params
 * {
    {"ids":{"required":true,"type":"string"}}
   }
 */
export function deleteSysOperLog(params) {
  return axios({
    method: 'delete',
    url: 'sys-oper-log',
    params
  })
}

/**
 * 获取所有SysOperLog
 * @params params
 * {
    {"page":{"required":true,"type":"integer"}},
    {"pageSize":{"required":true,"type":"integer"}}
   }
 */
export function getSysOperLogList(params) {
  return axios({
    method: 'get',
    url: 'sys-oper-log/list',
    params
  })
}

/**
 * 测试日志记录
 * @params params
 * {
    {"page":{"required":true,"type":"integer"}},
    {"pageSize":{"required":true,"type":"integer"}}
   }
 */
export function getSysOperLogListTest(params) {
  return axios({
    method: 'get',
    url: 'sys-oper-log/list-test',
    params
  })
}

/**
 * 获取第三方传入的log
 * @params data
 * {
    {"appId":{"type":"integer"}},
    {"businessType":{"type":"integer"}},
    {"createBy":{"type":"string"}},
    {"createDate":{"type":"string"}},
    {"errorMsg":{"type":"string"}},
    {"id":{"type":"integer"}},
    {"jsonResult":{"type":"string"}},
    {"method":{"type":"string"}},
    {"modifyBy":{"type":"string"}},
    {"modifyDate":{"type":"string"}},
    {"operIp":{"type":"string"}},
    {"operLocation":{"type":"string"}},
    {"operName":{"type":"string"}},
    {"operParam":{"type":"string"}},
    {"operTime":{"type":"string"}},
    {"operUrl":{"type":"string"}},
    {"operatorType":{"type":"integer"}},
    {"requestMethod":{"type":"string"}},
    {"status":{"type":"integer"}},
    {"title":{"type":"string"}}
   }
 */
export function postSysOperLogPostLog(data) {
  return axios({
    method: 'post',
    url: 'sys-oper-log/post-log',
    data
  })
}